package org.dromara.wms.domain;

  import org.dromara.common.tenant.core.TenantEntity;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import jakarta.validation.constraints.*;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
  import java.util.List;

/**
 * 库存盘点对象 wms_stock_check
 *
 * @author wenrui Su
 * @date 2024-05-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("wms_stock_check")
public class WmsStockCheck extends TenantEntity {

@Serial
private static final long serialVersionUID=1L;


  @ExcelProperty(value = "事务")
  @TableId(value = "id")
  private Long id;

  @ExcelProperty(value = "盘点单")
  @NotNull(message = "盘点单名称不能为空", groups = { AddGroup.class, EditGroup.class })
  private String name;

  @ExcelProperty(value = "仓库")
  @NotNull(message = "仓库不能为空", groups = { AddGroup.class, EditGroup.class })
  private Long warehouseId;

  @ExcelProperty(value = "盘点人")
  @NotNull(message = "盘点人不能为空", groups = { AddGroup.class, EditGroup.class })
  private Long userId;

  @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
  @ExcelDictFormat(dictType = "sys_status")
  @NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
  private String status;

  @ExcelProperty(value = "备注")
  private String remark;

  @ExcelProperty(value = "仓库名")
  @TableField(exist = false)
  private String wareName;

  @ExcelProperty(value = "用户名")
  @TableField(exist = false)
  private String nickName;

  @ExcelProperty(value = "子表")
  @TableField(exist = false)
  private List<WmsStockCheckLine> line;
}
